Skip to content

feat: snippets for table (under tree dots in navigation tree) #1476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Oct 18, 2024

Conversation

astandrik
Copy link
Collaborator

@astandrik astandrik commented Oct 16, 2024

Closes #1299

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
134 133 0 1 0

Bundle Size: 🔺

Current: 78.94 MB | Main: 78.94 MB
Diff: +0.01 MB (0.01%)

⚠️ Bundle size increased. Please review.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@astandrik astandrik force-pushed the astandrik.snippets-for-table-1299 branch from 5e7367f to c198207 Compare October 17, 2024 10:26
@astandrik astandrik marked this pull request as ready for review October 17, 2024 13:28
{
paths,
database,
timeout,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should exclude timeout (and probably concurrentId) in serializeQueryArgs, otherwise your getTableSchemaData will always initiate a new request and will never reuse data from other request to overviewApi

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In current versions there is always a new request, even if entity overview have already been loaded

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed timeout and concurrentId
now queries use same api and timeout moved to front with Promise.race and wait

paths: [path],
database: tenantName,
timeout: TABLE_SCHEMA_TIMEOUT,
concurrentId: getTableSchemaDataConcurrentId + 'getOverview',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need concurrentId here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

getTableSchemaData: build.mutation<SchemaData[], GetTableSchemaDataParams>({
queryFn: async ({path, tenantName, type}, {dispatch}) => {
try {
const schemaData = await dispatch(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really need this request for view? Probably, you should check if it's a table here

if (isViewType(type)){
  // do request for a view
} else {
  // do request for a table
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@astandrik
Copy link
Collaborator Author

We use tableSchemaDataApi as a distinct mutation that is declared in SchemaTree so that we can get IsLoading parameter (in the next task) that will show loading state in the button (after some work in NavigationTree component)

@astandrik astandrik added this pull request to the merge queue Oct 18, 2024
Merged via the queue into main with commit 39d86c9 Oct 18, 2024
6 checks passed
@astandrik astandrik deleted the astandrik.snippets-for-table-1299 branch October 18, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snippets for table (under tree dots in navigation tree)
2 participants